package com.itheima.create;

/**
 * @author Anomaly
 * @date 2023/2/10 14:33
 */

/**
 * Runnable简化写法
 */
public class RunnableDemo2 {
    public static void main(String[] args) {
        new Thread(() -> {
            for (int i = 0; i < 10000; i++) {
                System.err.println("子线程执行输出：" + i);
            }
        }).start();
        for (int i = 0; i < 10000; i++) {
            System.out.println("主线程执行输出：" + i);
        }
    }
}
